import {
      GET_SWIPERLIST,
      GET_ICONSLIST,
      GET_MAINIMGS,
      GET_RECOMMENDSLIST,
      GET_SEARCHSLIST,
      GET_SEARCH
} from "./mutations-types";

const mutations={
      [GET_SWIPERLIST](state,payLoad){
            state.swiperList=payLoad;
      },
      [GET_ICONSLIST](state,payLoad){
            state. iconsList=payLoad;
      },
      [GET_MAINIMGS](state,payLoad){
            state.mainImgs=payLoad;
      },
      [GET_RECOMMENDSLIST](state,payLoad){
            //console.log(payLoad.results)
            state.recommendslist=state.recommendslist.concat(payLoad.results);
      },
      [GET_SEARCHSLIST](state,payLoad){
            state.searchsList=payLoad;
      },
      [GET_SEARCH](state,payLoad){
             state.searchMsg=payLoad
      },
      addCars(state,payLoad){
            state.shopCars=payLoad;
            console.log(payLoad)
      }
}

export default  mutations;